package cn.print;

public class Printer {
    //  接口
    private  Ink ink ;
    private Paper paper ;

    public Ink getInk() {
        return ink;
    }

    public void setInk(Ink ink) {
        this.ink = ink;
    }

    public Paper getPaper() {
        return paper;
    }

    public void setPaper(Paper paper) {
        this.paper = paper;
    }
    // str 要打印的内容
    public  void print( String str ) {
        System.out.println("使用" + ink.getColor(255,200,200) +"颜色打印");
        for ( int i = 0;  i< str.length() ; i ++ ) {
            paper.putInChar(str.charAt(i));
        }
        System.out.println(paper.getContent());

    }


}
